"use strict";
{
    //声明一个对象
    let jincheng = {
        name: 'jincheng',
        age: 20,
        id: 1,
        cook() {
            console.log('会做川菜');
        }
    };
    let chunhui = {
        name: 'chunhui',
        age: 22,
        car: 'byd',
        id: 2,
        cook() {
            console.log('会做粤菜');
        }
    };
}
{
    //定义类  implements 实现
    class BoyStu {
        //构造方法
        constructor(name, age, id, className, car) {
            this.name = name;
            this.age = age;
            this.id = id;
            this.car = car;
            this.className = className;
        }
        //做饭的方法
        cook(cai) {
            console.log(`我可以做 ${cai} 菜品`);
        }
        //学习
        learn() {
            console.log('可以学习哦~~');
        }
        //编程
        program(language) {
            console.log(`我可以编写 ${language} 程序`);
        }
    }
    //实例化
    let jiakai = new BoyStu('jiakai', 20, 3, '三年二班', '雅阁');
    // jiakai.program('JavaScript');
}
{
    class Test {
        constructor() {
            this.a = 'aaa';
            this.b = 'bbb';
            this.c = 'ccc';
        }
    }
}
{
    class Test {
        constructor() {
            this.a = 'aa';
            this.b = 'bb';
        }
    }
}
